<?php
/**
 * Created by PhpStorm.
 * User: zhongyb
 * Date: 17-4-7
 * Time: 下午2:38
 */

namespace common\entities\common;

use common\entities\ContractEntity;
use Yii;

/**
 * This is the model class for table "myscrm_contract_sync_delete_data".
 *
 * @property string $id
 * @property string $table_name
 * @property string $primary_name
 * @property string $data_id
 * @property integer $sync_status
 * @property string $sync_on
 * @property string $created_on
 */
class MyscrmContractSyncDeleteDataEntity extends ContractEntity
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'myscrm_contract_sync_delete_data';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id', 'table_name', 'primary_name', 'data_id', 'created_on'], 'required'],
            [['sync_status'], 'integer'],
            [['sync_on', 'created_on'], 'safe'],
            [['id', 'data_id'], 'string', 'max' => 36],
            [['table_name'], 'string', 'max' => 100]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => '唯一ID',
            'table_name' => '表名',
            'primary_name' => '主键名称',
            'data_id' => '要删除的数据ID',
            'sync_status' => '是否同步，0否，1是',
            'sync_on' => '同步时间',
            'created_on' => '添加时间',
        ];
    }
}